<?php
function tf_custom_drop_div($id, $drop_zone = false) {
  global $thfr_css;

  if ($drop_zone) {
    $string = '<li class="custdiv" id="' . $id . '_custdiv"><span class="title">';
  } else {
    $string = '<div class="custom_drop_div" id="' . $id . '_custdiv"><div class="custom_drop_div_title">';
  }

  $string .= $id . ' <a title="DELETE" href="#" dropgroup="customdropdivs" class="dropitem-delete" id="' . $id . '">&nbsp;&nbsp;D&nbsp;</a> <a title="EDIT" href="#" dropgroup="customdropdivs" class="dropitem-edit" id="' . $id . '">&nbsp;E&nbsp</a>';

  if ($drop_zone) {
    $string .= '</span></li>';
    return $string;
  } else {
    $string .= '</div>';
  }

  $string .= '<div id="' . $id . '" selector="div#' . $id . '">';
  $body = 'Own div content will be here...';
  if (substr($thfr_css['customdropdivs'][$id]['content-real'], 0, 5) != '<?php') {
    $body = $thfr_css['customdropdivs'][$id]['content-real'];
  }
  $string .= $body;
  $string .= '</div>';

  if (!$drop_zone) {
    $string .= '</div>';
  }

  return $string;
}

?>